package com.cooldatasoft.app;

import org.apache.wicket.Request;
import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebSession;

import com.cooldatasoft.data.User;

public class WOCSession extends WebSession{

	private User user = null;

	public WOCSession(Request request) {
		super(request);
	}

	public boolean isAuthenticated() {
		//FIXME Timeout should be added and checked at every request
		return user != null;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	public static WOCSession get(){
		return (WOCSession) Session.get();
	}
}
